/*
Copyright 2014, KISSY v1.47
MIT Licensed
build time: Aug 28 12:46
*/
KISSY.add("event/base/utils",[],function(f){function b(a){if(0>a.indexOf("."))return[a,""];var d=a.match(/([^.]+)?(\..+)?$/),a=[d[1]];(d=d[2])?(d=d.split(".").sort(),a.push(d.join("."))):a.push("");return a}var c,e;return{splitAndRun:c=function(a,d){f.isArray(a)?f.each(a,d):(a=f.trim(a),-1===a.indexOf(" ")?d(a):f.each(a.split(/\s+/),d))},normalizeParam:function(a,d,e){var c=d||{},c="function"===typeof d?{fn:d,context:e}:f.merge(c),d=b(a),a=d[0];c.groups=d[1];c.type=a;return c},batchForType:function(a,
d){var e=f.makeArray(arguments),b=e[2+d];b&&"object"===typeof b?f.each(b,function(c,b){var f=[].concat(e);f.splice(0,2);f[d]=b;f[d+1]=c;a.apply(null,f)}):c(b,function(c){var b=[].concat(e);b.splice(0,2);b[d]=c;a.apply(null,b)})},fillGroupsForEvent:function(a,c){var f=b(a),g=f[1];g&&(g=e(g),c._ksGroups=g);c.type=f[0]},getGroupsRe:e=function(a){return RegExp(a.split(".").join(".*\\.")+"(?:\\.|$)")}}});
KISSY.add("event/base/object",[],function(f){function b(){this.timeStamp=f.now();this.currentTarget=this.target=void 0}var c=function(){return!1},e=function(){return!0};b.prototype={constructor:b,isDefaultPrevented:c,isPropagationStopped:c,isImmediatePropagationStopped:c,preventDefault:function(){this.isDefaultPrevented=e},stopPropagation:function(){this.isPropagationStopped=e},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=e;this.stopPropagation()},halt:function(a){a?this.stopImmediatePropagation():
this.stopPropagation();this.preventDefault()}};return b});
KISSY.add("event/base/observer",[],function(f){function b(c){f.mix(this,c)}b.prototype={constructor:b,equals:function(c){var e=this;return!!f.reduce(e.keys,function(a,b){return a&&e[b]===c[b]},1)},simpleNotify:function(c,b){var a;a=this.fn.call(this.context||b.currentTarget,c,this.data);this.once&&b.removeObserver(this);return a},notifyInternal:function(c,b){var a=this.simpleNotify(c,b);!1===a&&c.halt();return a},notify:function(c,b){var a=c._ksGroups;return a&&(!this.groups||!this.groups.match(a))?
void 0:this.notifyInternal(c,b)}};return b});
KISSY.add("event/base/observable",[],function(f){function b(b){this.currentTarget=null;f.mix(this,b);this.reset()}b.prototype={constructor:b,hasObserver:function(){return!!this.observers.length},reset:function(){this.observers=[]},removeObserver:function(b){var e,a=this.observers,d=a.length;for(e=0;e<d;e++)if(a[e]===b){a.splice(e,1);break}this.checkMemory()},checkMemory:function(){},findObserver:function(b){var e=this.observers,a;for(a=e.length-1;0<=a;--a)if(b.equals(e[a]))return a;return-1}};return b});
KISSY.add("event/base",["./base/utils","./base/object","./base/observer","./base/observable"],function(f,b){var c=b("./base/utils"),e=b("./base/object"),a=b("./base/observer"),d=b("./base/observable");return{Utils:c,Object:e,Observer:a,Observable:d}});
